<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit - Firmware API: PwmOut</title>
<link href="mt_doxygen.css" rel="stylesheet" type="text/css" />
<link href="../resources/mt_doxytabs.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.header {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12pt;
	color: #222222;
}
-->
</style>
</head>

<body>
<table width="800" border="0">
    <tr>
      <td colspan="3">
        <form method="get" action="http://www.google.com/search">
          <div align="right">
            <input type="text"   name="q" size="25"
              maxlength="255" value="" />
            <input type="submit" value="Search" />
            <input type="hidden" name="sitesearch" value="makingthings.com/ref/firmware/html" />
          </div>
        </form>
       </td>
    </tr>
    <tr>
      <td><div align="center"><a href="http://www.makingthings.com">
				<img src="../resources/logo_brown_medium.png" alt="MakingThings"
									width="200" height="78" border="0" align="middle" longdesc="http://www.makingthings.com" /></a></div></td>
				<td><div align="center" class="header">
      		Make Controller Kit <br />
          Firmware API
      </div></td>
      <td><div align="center"><a href="http://www.makezine.com">
					<img src="../resources/make_logo.png" alt="MAKE Zine" 
										width="164" height="73" border="0" align="middle" longdesc="http://www.makezine.com" /></a></div></td>
    </tr>
</table>
</body>
</html>
<!-- Generated by Doxygen 1.5.4 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>PwmOut<br>
<small>
[<a class="el" href="group___app_board.html">AppBoard</a>]</small>
</h1>The PWM Out subsystem underlies the DC Motor subsystem and controls the 4 PWM signals on the SAM7X.  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#gacf6fba798cec68ce1ffe52e6908e380">PwmOut_SetActive</a> (int index, int state)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether the specified PWM device is active.  <a href="#gacf6fba798cec68ce1ffe52e6908e380"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#g7d914ae310aee915ace97caf6d9458ef">PwmOut_GetActive</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the active state of the LED.  <a href="#g7d914ae310aee915ace97caf6d9458ef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#g7274bfadd63e562e9dcad4b17bb19415">PwmOut_SetDuty</a> (int index, int duty)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the speed of a PWM device.  <a href="#g7274bfadd63e562e9dcad4b17bb19415"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#g6f26406258e6fc3886597a5a6402e9f8">PwmOut_GetDuty</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the current duty of a PWM device.  <a href="#g6f26406258e6fc3886597a5a6402e9f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#gff93dbb3a903c93cfe40b2776b085187">PwmOut_SetInvertA</a> (int index, char invert)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set whether the A channel associated with a PWM out should be inverted.  <a href="#gff93dbb3a903c93cfe40b2776b085187"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#g00d5e809db127e369284f5613ebb3ee2">PwmOut_GetInvertA</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read whether the A channel of a PWM device is inverted.  <a href="#g00d5e809db127e369284f5613ebb3ee2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#gf19ae422767d01e401b2475c4d7609ea">PwmOut_SetInvertB</a> (int index, char invert)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read whether the B channel of a PWM out is inverted.  <a href="#gf19ae422767d01e401b2475c4d7609ea"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#g44301bb525ba9249d9e33efa49e959c9">PwmOut_GetInvertB</a> (int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read whether the B channel of a PWM device is inverted.  <a href="#g44301bb525ba9249d9e33efa49e959c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#g1e0bc39ca678a911351a3b36c5c579dd">PwmOut_SetInvert</a> (int index, char invertA, char invertB)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set whether the 2 channels of a PWM device are inverted.  <a href="#g1e0bc39ca678a911351a3b36c5c579dd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pwm_out.html#gba27993e99ff3cff0537ce050884f880">PwmOut_SetAll</a> (int index, int duty, char invertA, char invertB)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the duty and the inversion of both channels of a PWM device.  <a href="#gba27993e99ff3cff0537ce050884f880"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The PWM Out subsystem underlies the DC Motor subsystem and controls the 4 PWM signals on the SAM7X. 
<p>
Each PWM device controls a pair of Digital Outs - an A and a B channel:<ul>
<li>PwmOut 0 - Digital Outs 0 (A) and 1 (B).</li><li>PwmOut 1 - Digital Outs 2 (A) and 3 (B).</li><li>PwmOut 2 - Digital Outs 4 (A) and 5 (B).</li><li>PwmOut 3 - Digital Outs 6 (A) and 7 (B).</li></ul>
<p>
The A and B channels of a PWM device can be set independently to be inverted, or not, from one another in order to control motors, lights, etc. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g7d914ae310aee915ace97caf6d9458ef"></a><!-- doxytag: member="pwmout.c::PwmOut_GetActive" ref="g7d914ae310aee915ace97caf6d9458ef" args="(int index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_GetActive           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the active state of the LED. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success. </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00107">107</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g6f26406258e6fc3886597a5a6402e9f8"></a><!-- doxytag: member="pwmout.c::PwmOut_GetDuty" ref="g6f26406258e6fc3886597a5a6402e9f8" args="(int index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_GetDuty           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read the current duty of a PWM device. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The duty (0 - 1023). </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00140">140</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g00d5e809db127e369284f5613ebb3ee2"></a><!-- doxytag: member="pwmout.c::PwmOut_GetInvertA" ref="g00d5e809db127e369284f5613ebb3ee2" args="(int index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_GetInvertA           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read whether the A channel of a PWM device is inverted. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The inversion - 1/non-zero (inverted) or 0 (normal). </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00188">188</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g44301bb525ba9249d9e33efa49e959c9"></a><!-- doxytag: member="pwmout.c::PwmOut_GetInvertB" ref="g44301bb525ba9249d9e33efa49e959c9" args="(int index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_GetInvertB           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read whether the B channel of a PWM device is inverted. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The inversion - 1/non-zero (inverted) or 0 (normal). </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00241">241</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gacf6fba798cec68ce1ffe52e6908e380"></a><!-- doxytag: member="pwmout.c::PwmOut_SetActive" ref="gacf6fba798cec68ce1ffe52e6908e380" args="(int index, int state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_SetActive           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>state</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets whether the specified PWM device is active. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>An integer specifying the active state - 1 (active) or 0 (inactive). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success. </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00091">91</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gba27993e99ff3cff0537ce050884f880"></a><!-- doxytag: member="pwmout.c::PwmOut_SetAll" ref="gba27993e99ff3cff0537ce050884f880" args="(int index, int duty, char invertA, char invertB)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_SetAll           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>duty</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>invertA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>invertB</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the duty and the inversion of both channels of a PWM device. 
<p>
This is a convenience function to set all the properties of a PWM device in a single call.<br>
 It is equivalent to separate calls to <a class="el" href="group___pwm_out.html#g1e0bc39ca678a911351a3b36c5c579dd" title="Set whether the 2 channels of a PWM device are inverted.">PwmOut_SetInvert()</a> and <a class="el" href="group___pwm_out.html#g7274bfadd63e562e9dcad4b17bb19415" title="Set the speed of a PWM device.">PwmOut_SetDuty()</a>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM out. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>duty</em>&nbsp;</td><td>An integer specifying the duty (0 - 1023). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>invertA</em>&nbsp;</td><td>A character specifying the inversion of the A channel - 1/non-zero (inverted) or 0 (normal). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>invertB</em>&nbsp;</td><td>A character specifying the inversion of the B channel - 1/non-zero (inverted) or 0 (normal). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00303">303</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g7274bfadd63e562e9dcad4b17bb19415"></a><!-- doxytag: member="pwmout.c::PwmOut_SetDuty" ref="g7274bfadd63e562e9dcad4b17bb19415" args="(int index, int duty)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_SetDuty           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>duty</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the speed of a PWM device. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>duty</em>&nbsp;</td><td>An integer (0 - 1023) specifying the duty. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success. </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00120">120</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g1e0bc39ca678a911351a3b36c5c579dd"></a><!-- doxytag: member="pwmout.c::PwmOut_SetInvert" ref="g1e0bc39ca678a911351a3b36c5c579dd" args="(int index, char invertA, char invertB)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_SetInvert           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>invertA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>invertB</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set whether the 2 channels of a PWM device are inverted. 
<p>
This is a convenience function, and is equivalent to making separate calls to <a class="el" href="group___pwm_out.html#gff93dbb3a903c93cfe40b2776b085187" title="Set whether the A channel associated with a PWM out should be inverted.">PwmOut_SetInvertA()</a> and <a class="el" href="group___pwm_out.html#gf19ae422767d01e401b2475c4d7609ea" title="Read whether the B channel of a PWM out is inverted.">PwmOut_SetInvertB()</a>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>invertA</em>&nbsp;</td><td>A character specifying the inversion of the A channel - 1/non-zero (inverted) or 0 (normal). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>invertB</em>&nbsp;</td><td>A character specifying the inversion of the B channel - 1/non-zero (inverted) or 0 (normal). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success. </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00270">270</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gff93dbb3a903c93cfe40b2776b085187"></a><!-- doxytag: member="pwmout.c::PwmOut_SetInvertA" ref="gff93dbb3a903c93cfe40b2776b085187" args="(int index, char invert)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_SetInvertA           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>invert</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set whether the A channel associated with a PWM out should be inverted. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>invert</em>&nbsp;</td><td>A character specifying the inversion - 1/non-zero (inverted) 0 (normal). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success. </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00161">161</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gf19ae422767d01e401b2475c4d7609ea"></a><!-- doxytag: member="pwmout.c::PwmOut_SetInvertB" ref="gf19ae422767d01e401b2475c4d7609ea" args="(int index, char invert)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int PwmOut_SetInvertB           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>invert</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read whether the B channel of a PWM out is inverted. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An integer specifying which PWM device (0-3). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>invert</em>&nbsp;</td><td>A character specifying the inversion - 1/non-zero (inverted) 0 (normal). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success. </dd></dl>

<p>Definition at line <a class="el" href="pwmout_8c-source.html#l00214">214</a> of file <a class="el" href="pwmout_8c-source.html">pwmout.c</a>.</p>

</div>
</div><p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit</title>
<style type="text/css">
<!--
.footer {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #999999;
}
-->
</style>
</head>

<body>
<hr size="1">
<div>
  <p class="footer">The Make Controller Kit is an open source project maintained by <a href="http://www.makingthings.com">MakingThings</a>.<br />
    MakingThings code is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache 2.0 license</a>.<br />
    Bug tracker, development wiki and status can be found at <a href="http://dev.makingthings.com">http://dev.makingthings.com</a>.<br />
		This document was last updated on 5 Dec 2007.
</p>
</div>
<!-- Google Analytics Code -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-769030-1";
urchinTracker();
</script>
</body>
</html>
